package com.hailian.fintech.hlhouse_statusserver.web;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.hailian.fintech.hlhouse_statusserver.service.IStateService;
import com.hailian.fintech.hlhouse_statusserver.vo.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hanbo
 * @since 2020-06-01
 */
@RestController
@RequestMapping("/state")
public class StateController {

    //注入状态service
    @Autowired
    private IStateService iStateService;

    /**
     * 查询所有状态列表展示
     * @return
     */
    @RequestMapping("StateList")
    public ResultEntity StateList(){
        Wrapper wrapper = new EntityWrapper();
        List selectList = iStateService.selectList(wrapper);
        return ResultEntity.ok(selectList);
    }

}
